***Replication Do File for Barcena and Kerevel, "Legislative Effectiveness in Multiparty Presidential Systems"***


*****Table 2********
*Model 1
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
*Model 2
reg vwscore_org10_sinpda i.pres_party3 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if pres_party3>1, cluster(idpersonal)
margins pres_party3, asobserved
*Model 3
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if gob_v_opp==1, cluster(idpersonal)
margins pres_party4, asobserved
*Model 4
reg relev10510 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 5
reg proceso1_5 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved

*******Figure 1*****************
***Note: to replicate graph, please change file name location before running syntax below
*Figure 1a
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/fullmodel.gph"
*Figure 1b
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==2 & partido!=5, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/zedillo.gph"
*Figure 1c
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==1 | congress==3, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/fox.gph"
*Figure 1d
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==4 | congress==5, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/calderon.gph"
*Figure 1e
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==6 | congress==7, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/penanieto.gph"
*Figure 1f
reg pricom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/pricom.gph"
*Figure 1g
reg pancom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/pancom.gph"
*Figure 1h
reg prdcom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/prdcom.gph"
*Figure 1i
reg otherpartycom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
marginsplot, plotopts(connect(none))
graph save Graph "/Users/yannkerevel/Desktop/otroscom.gph"


*Note: to combine graphs, please change working directory to the same location as individual graphs before running below syntax
cd "/Users/yannkerevel/Desktop"
graph combine fullmodel.gph zedillo.gph fox.gph calderon.gph penanieto.gph ///
pricom.gph pancom.gph prdcom.gph otroscom.gph,  iscale(.5)

******Online Appendix**************

******Table B1**********
*Model 1
reg vwscore3_9_10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
*Model 2
reg relev3_9 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 3
reg relev2 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 4
reg proceso3_10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 5
reg proceso4 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 6
reg proceso5_10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved

******Table B2***********
*Model 1
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision i.congress  if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
*Model 2
nbreg g_iniciativas_presentadas i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
*Model 3
reg per_ini_com i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
*Model 4
reg per_ini_pleno i.pres_party4  i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved
*Model 5
reg per_ini_leyes i.pres_party4  i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins pres_party4, asobserved

****Table B3*******
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.pres_party4#i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress!=8, cluster(idpersonal)
margins female, at(pres_party4=(0(1)3)) asobserved

******Table C1******
*Model 1
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==2 & partido!=5, cluster(idpersonal)
margins pres_party4, asobserved
*Model 2
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==1 | congress==3, cluster(idpersonal)
margins pres_party4, asobserved
*Model 3
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==4 | congress==5, cluster(idpersonal)
margins pres_party4, asobserved
*Model 4
reg vwscore_org10_sinpda i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision if congress==6 | congress==7, cluster(idpersonal)
margins pres_party4, asobserved
*Model 5
reg pricom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 6
reg pancom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 7
reg prdcom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved
*Model 8
reg otherpartycom10 i.pres_party4 i.tier i.female i.suplente jcp mesa_directiva  ///
leg_experiencia_years i.pres_comision i.secretario_comision, cluster(idpersonal)
margins pres_party4, asobserved





